package web.controller.common;

import common.consts.ContentType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import service.ServiceResponse;
import service.TradeCategoryService;
import web.Routes;
import web.controller.Base;

/**
 * Created by aceyin on 15/7/9.
 */
@RestController
@RequestMapping(Routes.Common.TRADE_CATEGORY)
public class TradeCategory extends Base {

    @Autowired
    private TradeCategoryService tradeCategoryService;

    @RequestMapping(method = RequestMethod.GET, produces = ContentType.JSON)
    public ServiceResponse get() {
        ServiceResponse response = tradeCategoryService.listNormal();
        return response;
    }
}
